// TOWN DIALOGUE SCRIPT
//    Town 148: Lennus

begintalkscript;

variables;

short i,j,k,r1,choice;

// Laverne

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Laverne";
	text1 = "You meet an aging woman with curly hair and a winning smile. She doesn't seem to mind your intrusion. _I'm Laverne. Welcome to my little inn. How are ya'?_";
	text5 = "Laverne smiles. _Still wanna' talk, huh? Whaddaya want?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What do you do here?_";
	text1 = "_Oh, not much. I run a little boarding house here, for people who are in town for a bit. You can have a room for the night for only five coins._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Been busy?_";
	text1 = "_Na. Don't get many visitors out here. Only the odd types who want to see Carmine._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Who's Carmine?_";
	text1 = "_Oooh! He's a blacksmith, but a touchy fella'. His doors are locked, and he won't see anybody! Real odd and eccentric and stuff. But the people who come through say he's the best! Go figure._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_Can I get a room for the night?_ Pay five coins.";
	text1 = "She thanks you and lets you into a cozy room next door. The next morning, after a restful sleep, she brings you scones.";
	action = END_TALK;	
	code =
		sf(148,17,1);
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),23,14,FALSE);
		relocate_char(get_pc_id(1),24,14,FALSE);
		relocate_char(get_pc_id(2),24,15,FALSE);
		relocate_char(get_pc_id(3),23,15,FALSE);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I don't need a room._";
	text1 = "_Safe journey back to civilization, then!_";
	action = END_TALK;

// Carmine

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Carmine";
	text1 = "You meet a slightly deranged man. He stands hunched over his anvil with a hammer in one hand and a pair of tongs in the other.";
	text2 = "At first, he refuses to acknowledge your presence. There is a long, awkward silence. Finally, he grumbles, _I'm Carmine. You're trespassing. This better be good!_";
	text5 = "Carmine still holds a hammer in one hand and a pair of tongs in the other. He's still a bit unbalanced, but he has calmed down slightly.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_Do you have a free moment to speak with me?_";
	text1 = "He snarls. _I bet you come to purchase weapons, huh?_";

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_Not really._";
	text1 = "_Well, I deal with weapons. Nothing else. So go away._";
	action = END_TALK;

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Ummm, yes?_";
	text1 = "_Well forget it! I don't make stuff much anymore! I'm just too good. My skills are wasted!_";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_You have great confidence in your skills._";
	text1 = "_Oh, I can see a little bit of healthy pride is alien to you! Well, I stay out here and plan, and I'm proud of it!_";
	text3 = "_And don't try to trick me into doing more work for you. You're too undemanding. I need to find someone more important!_";
	code =
		if (gf(148,9) < 2)
			rs(3);
	break;
	
begintalknode;
	state = 32;
	nextstate = 33;
	condition = gf(148,9) <= 1;
	question = "_Plan what?_";
	text1 = "_I plan the truly great weapon I'm going to make. The problem is, I need truly great material._";

begintalknode;
	state = 33;
	nextstate = -1;
	condition = gf(148,9) <= 1;
	question = "_What if I brought some good metal?_";
	text1 = "_I long for a challenge. I'm desperate for it. If you ever find a piece of truly unusual, exceptional metal, bring it to me. I'll make a sword for you, a truly great sword! I ask only 1000 coins for labor._";
	action = SET_SDF 148 9 1;
	code =	
		toggle_quest(61,1);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(148,9) == 1 && has_spec_item(38) > 0 && gf(148,8) == 0;
	question = "_I have some unusual metal here. Can you make something out of it?_ (Pay 1000 coins.)";
	code =
		run_hardcode(148);
	break;
	
begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(148,8) >= 1 && gf(148,11) <= 0;
	question = "_Have you made my sword yet?_";
	code =
		run_hardcode(148);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = has_spec_item(38) <= 0 && gf(148,9) == 1 && gf(148,8) == 0;
	question = "_Do I have any metal you could use to make a weapon?_";
	text1 = "You show Carmine the metal in your possession. He grows angry. _Where is the metal I need? How am I supposed to display the full extent of my talents using only your pathetic dross?_";

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_I would like to have my weapons augmented._";
	text1 = "He spits on the floor. _I do not sully myself by touching inferior products. Get out of my sight._";
	action = END_TALK;

